home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / util2 / hexdump.lha / hexdump / README < prev   
Text File  |  1995-11-09  |  2KB  |  49 lines

  1.             ===========================
  2.             HD Hexadecimal Dump Program
  3.             ===========================
  4.  
  5. This program came about because I was not satisfied with the output from
  6. the standard UNIX od utility. It is basically a case of personal preference
  7. but I hope that some people will find this useful and perhaps preferable
  8. to od. It is not quite as flexible as od in that it can only output in hex
  9. and ascii but it is more flexible than od in format and control of output.
  10.  
  11. One of the the main considerations when writing the hexprint routine was speed,
  12. hence the offset printing and compression can be compiled out if the
  13. appropriate flags are not defined, giving a faster but simpler dump routine.
  14. Unfortunately as a result the code is not pretty!
  15.  
  16. Porting of the code to a MS_DOS environment took about 15 minutes (most of
  17. which was spent looking for the correct compiler flags and include files) and
  18. so can easily be used on considerably inferior systems without any problems.
  19.  
  20.  
  21.  - hd.c
  22.  
  23. This contains main, file open and close and the argument processor.
  24.  
  25.  - hexprint.c
  26.  
  27. The file hexprint.c contains a routine which can be used independantly
  28. from the main hd program in the debugging of your own programs for outputing
  29. areas of memory in a hexadecimal form.
  30.  
  31. It uses bcopy and bcmp or memcpy and memcmp routines depending on
  32. whether the ATT compilation flag is set or not. Specifying ATT causes bcopy
  33. and bcmp to be used. Hence if compilation is being done on a machine running
  34. an AT&T version of unix use the ATT flag.
  35.  
  36. The H_OFFSETS and H_COMPRESS compilation flags switch on offset printing
  37. and compression, these need to be used in conjunction with the hex_compression
  38. and offset_print flags which must be set to true in the main program or
  39. enclosing scope of the called hexprint routine. The offset variable must be
  40. set each time the hexprint routine is entered otherwise the offset numbering
  41. will always start at 0, so if you want to print out a number of buffers in
  42. succession with continuous offset numbering you need to update the
  43. offset after each call of hexprint, with the size of the buffer
  44. last passed to hexprint.
  45.  
  46. Omission of H_OFFSETS and H_COMPRESS means you can forget everything I just
  47. said and just call the hexprint routine straight.
  48.  
  49.